﻿<Window x:Class="GuiLayer.ApWagensToonAlle"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ApWagensToonAlle" Height="392" Width="464"
        DataContext = "{Binding RelativeSource={RelativeSource Self}}">
    <Window.Resources>
        <CollectionViewSource x:Name="MyCollection" x:Key="wagensViewSource" Source="{Binding Path=voertuigenLijst, Source={x:Static Application.Current}}">
        </CollectionViewSource>
    </Window.Resources>

    <Grid DataContext="{Binding voertuigenLijst}" Margin="0, 0, 0, 13">
        <Grid.RowDefinitions>
            <RowDefinition Height="160*"/>
            <RowDefinition Height="159*"/>
        </Grid.RowDefinitions>
        <ListView Grid.Row="0" Margin="10,10,0,0" ItemsSource="{Binding}" SelectionMode="Single" SelectionChanged="ListView_SelectionChanged" >
            <ListView.View >
                <GridView>
                    <GridViewColumn x:Name="VoertuigID" Header="VoertuigID" Width="50">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding VoertuigID}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="merk" Header="Merk" Width="100">
                        <GridViewColumn.CellTemplate> 
                            <DataTemplate>
                                <TextBox Text="{Binding merk}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="type" Header="Type" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding type}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="motorisatie" Header="Motorisatie" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding motorisatie}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="brandstof" Header="Brandstof" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding brandstof}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="deuren" Header="Deuren" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding deuren}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="km" Header="Km" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding km}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="filiaalnr" Header="FiliaalNr" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding filiaalnr}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        <Grid HorizontalAlignment="Left" Height="99" Margin="0,77,0,-3" VerticalAlignment="Top" Width="456" Grid.Row="1"/>
        <Button Content="Terug" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,10,0,0" Grid.Row="1" Click="Button_Click_1"/>

    </Grid>
</Window>
